#include<iostream>
#include<assert.h>
#include "list.h"
using namespace std;

void test1()
{
	myList::list<int> lt;

	lt.push_back(1);
	lt.push_back(2);
	lt.push_back(3);
	lt.push_back(4);

	//1 2 3 4
	for (auto ch : lt)
		cout << ch << ' ';
	cout << endl;

	myList::list<int> lt1(lt);
	//1 2 3 4
	for (auto ch : lt1)
		cout << ch << ' ';
	cout << endl;

	myList::list<int> lt2(lt.begin(), lt.end());
	//1 2 3 4
	for (auto ch : lt2)
		cout << ch << ' ';
	cout << endl;

	myList::list<int> lt3 = lt;
	//1 2 3 4
	for (auto ch : lt3)
		cout << ch << ' ';
	cout << endl;

	myList::list<int> lt4(5, 1);
	//1 1 1 1 1
	for (auto ch : lt4)
		cout << ch << ' ';
	cout << endl;

	cout << lt4.size() << endl;//5
	cout << lt4.empty() << endl;//0
	cout << lt3.front() << endl;//1
	cout << lt3.back() << endl;//4

	lt3.pop_back();
	//1 2 3
	for (auto ch : lt3)
		cout << ch << ' ';
	cout << endl;
	lt3.pop_front();
	//2 3
	for (auto ch : lt3)
		cout << ch << ' ';
	cout << endl;

	lt3.push_front(1);
	//1 2 3
	for (auto ch : lt3)
		cout << ch << ' ';
	cout << endl;

}

int main()
{
	test1();


	return 0;
}
